﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Common.Enums;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.Sellers;


namespace ZBJF.Warranty.IBLL
{
    public partial interface ISellerEmployeeService
    {
        SellerEmployee Login(string userAccount, string password,out bool flag);

        bool IsExist(string userAccount, string userName);

        SellerEmployee LoadByID(long id);
        /// <summary>
        /// 用户名或手机号码
        /// </summary>
        /// <param name="userPhone"></param>
        /// <returns></returns>
        SellerEmployee LoadByPhone(string userPhone);

        /// <summary>
        /// 验证密码是否正确
        /// </summary>
        /// <param name="id"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        bool ValidatePassword(long id,string password);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="id"></param>
        /// <param name="newPassword"></param>
        /// <param name="modifyBy"></param>
        /// <returns></returns>
        bool ModifyPassword(long id, string newPassword, string modifyBy);
        SellerEmployee LoadByUserAccount(string userAccount);
        List<SellerEmployee> LoadBySellerID(long sellerID);
        
        /// <summary>
        /// 筛选列表
        /// </summary>
        /// <param name="model">筛选条件</param>
        /// <param name="total">条数</param>
        /// <returns></returns>
        IQueryable<SellerEmployee> GetPagingList(SellerEmployeeModel model, out int total);
    }
}
